import { createApp } from 'vue'
import './styles/base.scss' // 引入基础样式
import 'md-editor-v3/lib/style.css'
import App from './App.vue'
import router from './routers/router' // 引入路由

const app = createApp(App)

//引入状态库pinia
import { createPinia } from "pinia";
const pinia = createPinia();
pinia.use(({ store }) => {
    const initialState = JSON.parse(JSON.stringify(store.$state));
    store.$reset = () => {
        store.$patch(initialState);
    };
});
app.use(pinia);


app.use(router) // 使用路由

app.mount('#app')
